package http

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"time"
)

func RunWeb(router *gin.Engine, port string) *http.Server {
	srv := &http.Server{
		Addr:           ":" + port,
		Handler:        router,
		ReadTimeout:    5 * time.Second,
		WriteTimeout:   65 * time.Second,
		MaxHeaderBytes: 1 << 20,
	}
	return srv
}
